//package com.example.demo.config;
//
//import org.springframework.http.server.ServerHttpRequest;
//import org.springframework.http.server.ServerHttpResponse;
//import org.springframework.web.socket.WebSocketHandler;
//import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;
//
//import java.util.Map;
//
///**
// * TODO
// *
// * @author JW
// * @version 1.0
// * @date 2021/2/5 9:57
// */
//public class VideoClientHandshakeInterceptor extends HttpSessionHandshakeInterceptor {
//
//    @Override
//    public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception ex) {
//        // TODO Auto-generated method stub
//        System.out.println("After handshake " + request.getRemoteAddress().toString());
//        super.afterHandshake(request, response, wsHandler, ex);
//    }
//
//    @Override
//    public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler,Map<String, Object> map) throws Exception {
//        // TODO Auto-generated method stub
//        System.out.println("Before handshake " + request.getRemoteAddress().toString());
//        return super.beforeHandshake(request, response, handler, map);
//    }
//}
